#ifndef SCHEDULER_FEASIBILITY_H
#define SCHEDULER_FEASIBILITY_H

/* abstract task struct for feasibility analysis
 * and deadline inheritance
 */
struct Senfe_task_abs
{
	const struct Senfe_task_attr *attr;	// task specification
	u32		absolute;	// deadline, relative to previous task in queue
	u32		delta;		// derived deadline (deadline inheritance)
	struct Senfe_task_abs *next;
};


int draw_graph(void);
int feasibility_analysis(struct Senfe_task_abs *new_task_set);
static int feasibility_next(struct Senfe_task_abs **wait_queue, struct Senfe_task_abs **release_queue, u32 *t, u32 *c);
static double feasibility_blocking(struct Senfe_task_abs **wait_queue, struct Senfe_task_abs **release_queue, u32 t);
void scheduler_calc_delta( struct Senfe_task_abs *new_task_set );
static void task_abs_queue_insert(struct Senfe_task_abs **taskp, struct Senfe_task_abs *task);
static struct Senfe_task_abs * task_abs_queue_first(struct Senfe_task_abs **taskp);
void res_table_calc_delta( struct Senfe_res_table *new_res_table );


#endif // SCHEDULER_FEASIBILITY_H
